Datatype casting:
It is a type casting when you assign a value of one datatype to another types

There are 2 types of casting:
1. Implicit OR Widening casting (Conversion).
   This type of conversion happens automatically in java. Here we are storing OR converting a smaller type to a larger type size.

Ex:
byte->short->char->int->long->float->double

Rules for implicit casting:
(a) Both the datatypes should be compatible
(b) The source datatype should be smaller than the destination datatypes
-----------------------------------------------------------

2. Explicit OR Narrowing casting (Casting).
   This type of casting we have to do manually by placing the type in parentheses in front of the value.

EX: 
double->float->long->int->char->short->byte

Rules for Explicit casting:
(a) Both the datatypes should be compatible
(b) The source datatype is bigger than the destination datatypes

Note: Here we might see the data loss (not always)